package com.mybatis.service.sys.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.mybatis.dao.sys.SysPicDao;
import com.mybatis.entity.SysPic;
import com.mybatis.service.sys.SysPicService;

@Service
public class SysPicServiceImpl implements SysPicService{

	@Resource
	private SysPicDao sysPicDao;

	@Override
	public boolean addPic(SysPic sysPic) {
		try {
			if(sysPicDao.addPic(sysPic)>0){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

	@Override
	public boolean delPic(int id) {
		try {
			if(sysPicDao.delPic(id)>0){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

	@Override
	public boolean updatePic(SysPic sysPic) {
		try {
			if(sysPicDao.updatePic(sysPic)>0){
				return true;
			}else{
				return false;
			}
		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}

}
